package org.catlabs.patterns.decorator.starbuz;

import org.catlabs.patterns.decorator.starbuz.coffee.DarkRoast;
import org.catlabs.patterns.decorator.starbuz.coffee.Decaf;
import org.catlabs.patterns.decorator.starbuz.coffee.Espresso;
import org.catlabs.patterns.decorator.starbuz.coffee.HouseBlend;
import org.catlabs.patterns.decorator.starbuz.condiment.Mocha;
import org.catlabs.patterns.decorator.starbuz.condiment.Soy;
import org.catlabs.patterns.decorator.starbuz.condiment.Whip;

public class StarbuzCoffee {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Beverage espresso = new Espresso();
		dispatch(espresso);
		
		Beverage mocha = new DarkRoast();
		mocha = new Mocha(mocha);
		mocha = new Whip(mocha);
		dispatch(mocha);
		
		Beverage hipster = new Whip(new Soy(new HouseBlend()));
		dispatch(hipster);
		
		Beverage decaf = new Mocha(new Decaf());
		dispatch(decaf);
		
		Beverage colossus = new Whip(new Whip(new Soy(new Mocha(new Espresso()))));
		dispatch(colossus);

	}
	
	public static void dispatch(Beverage beverage){
		System.out.println(""+beverage.getDescription()
				+".\nIt's $"+beverage.cost()+", please.\n\n");
	}

}
